package com.borrow.service.client;

import com.borrow.service.client.impl.BookFallbackClient;
import com.commons.entity.Book;
import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PathVariable;

@FeignClient(value = "bookservice", fallback = BookFallbackClient.class)
public interface BookClient {
    /**
     *  用于间接 接口内部调用去获取用户信息的接口
     * @param bid
     * @return
     */
    @GetMapping("/book/api/{bid}") //记得加入完整路径
    Book apiFindBookById(@PathVariable("bid") Integer bid);
}
